<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/7/1
 * Time: 9:22.
 */

namespace app\admin\controller;

use think\App;
use think\Controller;

class Index extends Common
{
    /**
     * 构造方法.
     * @author   juzi
     * @blog     https://blog.csdn.net/juziaixiao
     * @version  1.0.0
     * @datetime 2020年7月10日09:35:10
     */
    public function __construct()
    {
        // 调用父类前置方法
        parent::__construct();

        // 登录校验
        $this->IsLogin();
    }

    public function page()
    {
        $view = input('get.view');

        return $this->fetch('/page/'.$view);
    }

    public function index()
    {
        return $this->fetch('welcome');
    }
    public function home()
    {
        return $this->fetch();
    }


    public function getMenuList()
    {

        return [
            'homeInfo' => [
                'title' => '首页',
                'href' => '/admin/Index/home',
            ],
            'logoInfo' => [
                'image' => '/static/layuimini/images/logo.png',
                'title' => '云盟商桥',
                'href' => '',
            ],
            'menuInfo' => [
                [
                    'title' => '云盟商桥',
                    'icon' => 'fa fa-address-book',
                    'href' => '',
                    'target' => '_self',
                    'child' => [
                        [
                            'title' => '数据中心',
                            'href' => '/admin/Datacenter/Index',
                            'icon' => 'fa fa-archive',
                            'target' => '_self',
                        ],
                        [
                            'title' => '系统设置',
                            'href' => '',
                            'icon' => 'fa fa-area-chart',
                            'target' => '_self',
                            'child' => [
                                [
                                    'title' => '账号设置',
                                    'href' => '/admin/systemset/index',
                                    'icon' => 'fa fa-arrows',
                                    'target' => '_self',
                                ],
                                [
                                    'title' => '版本控制',
                                    'href' => '/admin/systemset/VersionIndex',
                                    'icon' => 'fa fa-asterisk',
                                    'target' => '_self',
                                ],

                            ],
                        ],

                        [
                            'title' => '通知管理',
                            'href' => '/admin/notice/index',
                            'icon' => 'fa fa-anchor',
                            'target' => '_self',
                        ],
                        [
                            'title' => '订单管理',
                            'href' => '',
                            'icon' => 'fa fa-window-maximize',
                            'target' => '_self',
                            'child' => [
                                [
                                    'title' => '订单统计',
                                    'href' => '/admin/Order/Index',
                                    'icon' => 'fa fa-snowflake-o',
                                    'target' => '_self',
                                ],
                                [
                                    'title' => '订单操作',
                                    'href' => '/admin/Order/ActionIndex',
                                    'icon' => 'fa fa-shield',
                                    'target' => '_self',
                                ],

                            ],
                        ],
                        [
                            'title' => '供应商管理',
                            'href' => '/admin/Supplier/Index',
                            'icon' => 'fa fa-cubes',
                            'target' => '_self',
                        ],   [
                            'title' => '用户管理',
                            'href' => '/admin/Member/Index',
                            'icon' => 'fa fa-user',
                            'target' => '_self',
                        ],   [
                            'title' => '商品管理',
                            'href' => '/admin/bizpro/index',
                            'icon' => 'fa fa-cube',
                            'target' => '_self',
                        ],
                        [
                            'title' => '满减管理',
                            'href' => '/admin/reduction/index',
                            'icon' => 'fa fa-filter',
                            'target' => '_self',
                        ],
                        [
                            'title' => '财务管理',
                            'href' => '',
                            'icon' => 'fa fa-smile-o',
                            'target' => '_self',
                            'child' => [
                                [
                                    'title' => '供应商结款',
                                    'href' => '',
                                    'icon' => 'fa fa-street-view',
                                    'target' => '_self',
                                    'child' => [
                                        [
                                            'title' => '供应商结款',
                                            'href' => '/admin/supplierpayment/index',
                                            'icon' => 'fa fa-snowflake-o',
                                            'target' => '_self',
                                        ],
//                                        [
//                                            'title' => '结款记录',
//                                            'href' => '/admin/supplierpayment/fee_index',
//                                            'icon' => 'fa fa-server',
//                                            'target' => '_self',
//                                        ],

                                    ],
                                ],
                                [
                                    'title' => '费用管理',
                                    'href' => '',
                                    'icon' => 'fa fa-tag',
                                    'target' => '_self',
                                    'child' => [
                                        [
                                            'title' => '费用类型',
                                            'href' => '/admin/cost/costcate',
                                            'icon' => 'fa fa-tint',
                                            'target' => '_self',
                                        ],
                                        [
                                            'title' => '费用列表',
                                            'href' => '/admin/cost/Index',
                                            'icon' => 'fa fa-reorder',
                                            'target' => '_self',
                                        ],

                                    ],
                                ],
                                [
                                    'title' => '资金管理',
                                    'href' => '/admin/supplierpayment/poll_index',
                                    'icon' => 'fa fa-sliders',
                                    'target' => '_self',
                                ],

                                [
                                    'title' => '利润统计',
                                    'href' => '/admin/ProfitData/Index',
                                    'icon' => 'fa fa-sliders',
                                    'target' => '_self',
                                ],
                                [
                                    'title' => '收支统计',
                                    'href' => '/admin/IncomeData/Index',
                                    'icon' => 'fa fa-sliders',
                                    'target' => '_self',
                                ],
                            ],
                        ],
                        [
                            'title' => '应用管理',
                            'href' => '',
                            'icon' => 'fa fa-snowflake-o',
                            'target' => '',
                            'child' => [
                                [
                                    'title' => '协议管理',
                                    'href' => '/admin/Apply/Agreement',
                                    'icon' => 'fa fa-envelope-o',
                                    'target' => '_self',
                                ],
                                [
                                    'title' => '分类管理',
                                    'href' => '/admin/Spearea/CateIndex',
                                    'icon' => 'fa fa-shield',
                                    'target' => '_self',
                                ],
                                [
                                    'title' => '客服管理',
                                    'href' => '/admin/Apply/Serviceinfo',
                                    'icon' => 'fa fa-headphones',
                                    'target' => '_self',
                                ],
                                [
                                    'title' => '广告管理',
                                    'href' => '/admin/Adverbanner/Index',
                                    'icon' => 'fa fa-film',
                                    'target' => '_self',
                                ],
                                [
                                    'title' => 'banner管理',
                                    'href' => '/admin/Banner/Index',
                                    'icon' => 'fa fa-file-picture-o',
                                    'target' => '_self',
                                ],
                                [
                                    'title' => '物流管理',
                                    'href' => '/admin/Express/Index',
                                    'icon' => 'fa fa-headphones',
                                    'target' => '_self',
                                ],

                            ],
                        ],


                    ],
                ],



            ],
        ];

    }
}
